home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 61 / 061.d81 / vcr library (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  11KB  |  389 lines

  1. 100 rem trasmart software
  2. 101 rem vcr library
  3. 102 gosub448:goto161
  4. 103 :
  5. 104 s=54272:pokes+1,112:pokes+5,10:pokes+6,9:pokes+24,15:pokes+4,17:pokes+4,16
  6. 105 return
  7. 106 :
  8. 107 l=len(k$):m=38-l/2:fori=1tolen(k$)-19
  9. 108 printl$spc(m)left$(k$,i)right$(k$,l-(l-i)):m=m-1:next:return
  10. 109 :
  11. 110 sys49152
  12. 111 print"[147]     [158]q to quit  [158]p to pause / resume"
  13. 112 open8,8,0,"$0:*=r"
  14. 113 get#8,a$,b$:n$=chr$(0)
  15. 114 get#8,a$,b$:ifb$=""then123
  16. 115 get#8,a$,b$:a=asc(a$+n$):b=asc(b$+n$)
  17. 116 c$=mid$(str$(a+256*b),2)+chr$(32)
  18. 117 print"       ";
  19. 118 printc$;:get#8,c$:ifc$<>""then118
  20. 119 print:getk$:ifk$="p"ork$="q"then121
  21. 120 getk$
  22. 121 ifk$="p"thenwait197,1:goto120
  23. 122 ifk$<>"q"then114
  24. 123 close8
  25. 124 print"[156]press space to continue[146]"
  26. 125 s=54272:pokes+1,112:pokes+5,10:pokes+6,9:pokes+24,15:pokes+4,17:pokes+4,16
  27. 126 ifpeek(203)<>60then126
  28. 127 goto177
  29. 128 :
  30. 129 poke198,0:y$="":z$=""
  31. 130 print"[156]_[157][146]";
  32. 131 forn=1to75 :getz$:ifz$<>""then137
  33. 132 next
  34. 133 print"_[157]";
  35. 134 forn=1to75 :getz$:ifz$<>""then137
  36. 135 next
  37. 136 getz$:ifz$=""then130
  38. 137 l=len(y$)
  39. 138 ifz$=chr$(13)andre=1thenprint"[156][157] ":return
  40. 139 ifz$=chr$(13)thenprint"[157] ":return
  41. 140 ifz$=chr$(20)andlandre=1thenprint"[156] [157][157]";:y$=left$(y$,l-1):goto130
  42. 141 ifz$=chr$(20)andlthenprint" [157][157]";:y$=left$(y$,l-1):goto130
  43. 142 ifhl=2orhl=19thenif(z$<"a"orz$>"z")andz$<>" "and(z$<"0"orz$>"9")then130
  44. 143 ifhl=1orhl=3orhl=4thenif(z$<"0"orz$>"9")andz$<>" "then130
  45. 144 ifl>=hlthen130
  46. 145 ifre=1thenprint"[156]";z$;:y$=y$+z$:goto130
  47. 146 printz$;:y$=y$+z$
  48. 147 goto130
  49. 148 :
  50. 149 input#15,e,e$,a,b
  51. 150 ife=0ore=73thenreturn
  52. 151 ife=50thenreturn
  53. 152 print"there is an i/o problem"
  54. 153 print"error # is";e;" ";e$
  55. 154 print"track";a;"; sector";b
  56. 155 close8:close15
  57. 156 print"[156]press space to continue[146][145][145]";
  58. 157 ifpeek(203)=64then157
  59. 158 ifpeek(203)<>60then157
  60. 159 goto177
  61. 160 close8:close15:end
  62. 161 :
  63. 162 h=0
  64. 163 sp$="                                       "
  65. 164 open15,8,15,"i0":close15
  66. 165 f$="vcr library.ml":poke147,0:sys57812f$,8,1:sys62631
  67. 166 ll$=chr$(13)
  68. 167 ln=40
  69. 168 open15,8,15
  70. 169 gosub148
  71. 170 close8:close15
  72. 171 k$="[152][221]        instructions (y/n)        [221]":l$=l$+"":gosub107
  73. 172 poke198,0
  74. 173 ifpeek(203)=64then173
  75. 174 ifpeek(203)=39then177
  76. 175 ifpeek(203)=25thenis=1:gosub362:goto177
  77. 176 goto172
  78. 177 sys49152
  79. 178 print"[147][156][213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]";
  80. 179 print"[221] r[156]ead a tape";
  81. 180 print"  w[156]rite a tape";
  82. 181 print"  e[156]dit tape [221]";
  83. 182 print"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]";
  84. 183 print"[221] p[156]rint label";
  85. 184 print"  c[156]reate file";
  86. 185 print"   d[156]irectory [221]";
  87. 186 print"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]";
  88. 187 print"[221] h[156]elp screen";
  89. 188 print"  s[156]ee all files";
  90. 189 print" l[156]oadstar  [221]";
  91. 190 print"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203][146]";
  92. 191 poke198,0
  93. 192 geta$:ifa$=""ora$=" "then192
  94. 193 gosub104
  95. 194 ifa$=chr$(80)ora$=chr$(87)ora$=chr$(82)then201
  96. 195 ifa$=chr$(67)ora$=chr$(69)then201
  97. 196 ifa$=chr$(76)then325:rem l
  98. 197 ifa$=chr$(68)then109:rem d
  99. 198 ifa$=chr$(83)then398:rem s
  100. 199 ifa$=chr$(72)thenh=1:goto362:rem h
  101. 200 goto177
  102. 201 print"[145][156][171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179][146]"
  103. 202 print"[145][156][221]what tape number to                   [221][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]"
  104. 203 print"[156][202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203][146]"
  105. 204 print"[145][145][145]"spc(21);
  106. 205 ifa$=chr$(80)thenprint"print ";
  107. 206 ifa$=chr$(87)thenprint"write ";
  108. 207 ifa$=chr$(82)thenprint"read ";
  109. 208 ifa$=chr$(67)thenprint"create ";
  110. 209 ifa$=chr$(69)thenprint"edit ";
  111. 210 ifa$<chr$(65)ora$>chr$(90)then178
  112. 211 re=1:hl=3:gosub129:v$=y$:re=0
  113. 212 gosub104
  114. 213 ifval(v$)<1thenprint"file # must be greater than 0"
  115. 214 ifval(v$)>200thenprint"file # must be less than 200"
  116. 215 ifval(v$)<1orval(v$)>200thenprint"[156]press space to continue[146]"
  117. 216 ifval(v$)<1orval(v$)>200thenwait197,4:a$="":goto177
  118. 217 vw=0
  119. 218 ifa$=chr$(80)then332:rem p
  120. 219 ifa$=chr$(82)then225:rem r
  121. 220 ifa$=chr$(87)then255:rem w
  122. 221 ifa$=chr$(67)then277:rem c
  123. 222 ifa$=chr$(69)then294:rem e
  124. 223 goto177
  125. 224 :
  126. 225 :
  127. 226 open15,8,15
  128. 227 gosub148
  129. 228 print#15,"r0:"+v$+"="+v$:input#15,er
  130. 229 if er<>63 then printspc(13)"file is empty [156]":rn=8:goto246
  131. 230 open8,8,8,"0:"+(v$)+",l,"+chr$(ln)
  132. 231 gosub148
  133. 232 rn=1
  134. 233 rem return here for line 2 - 7
  135. 234 gosub331
  136. 235 print#15,"p"+chr$(96+8)+chr$(rl)+chr$(rh)+chr$(1)
  137. 236 gosub148
  138. 237 input#8,aa$,bb$,cc$,dd$,ee$
  139. 238 gosub148
  140. 239 ifaa$="[255]"andrn=1thenprintspc(13)"file is empty [156]":rn=8:goto246
  141. 240 ifaa$="[255]"thenrn=8:goto246
  142. 241 ifcc$=""thencc$="      deleted[152]"
  143. 242 ifrn=1thenprint"[156][221]       tape number ";v$;" contains "
  144. 243 ifrn=1thenprint"[156][202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203][146]";
  145. 244 ifrn=1thenprint"     title                time   start   [152]"
  146. 245 printaa$+". "tab(3)cc$tab(27)bb$tab(34)dd$tab(33)ee$
  147. 246 ifrn>=8andvw=1thenclose8:close15:return
  148. 247 ifrn>=8thenprint"[156]press space to continue[146]"
  149. 248 ifrn>=8thenclose8:close15
  150. 249 ifrn>=8thengosub104
  151. 250 ifrn>=8thenifpeek(203)<>60then250
  152. 251 ifrn>=8then254
  153. 252 rn=rn+1
  154. 253 goto233
  155. 254 goto177
  156. 255 :
  157. 256 open15,8,15
  158. 257 gosub148
  159. 258 open8,8,8,"0:"+(v$)+",l,"+chr$(ln)
  160. 259 gosub148
  161. 260 print"ready to write tape #";v$
  162. 261 print"line# (1  chr max) ";:hl=1:gosub129:aa$=y$
  163. 262 ifaa$=""thenprint"cancelled":forpa=1to800:nextpa:goto275
  164. 263 rn=val(aa$)
  165. 264 ifrn>=8thenclose8:close15:goto177
  166. 265 print"time  (4  chr max) ";:hl=4:gosub129:bb$=y$
  167. 266 print"title (21 chr max) ";:hl=21:gosub129:cc$=y$
  168. 267 print"start (4  chr max) ";:hl=4:gosub129:dd$=y$
  169. 268 rc$=aa$+ll$+bb$+ll$+cc$+ll$+dd$+ll$+ee$
  170. 269 gosub331
  171. 270 print#15,"p"+chr$(96+8)+chr$(rl)+chr$(rh)+chr$(1)
  172. 271 gosub148
  173. 272 if e=50 thenprint"the dos will expand the file now"
  174. 273 print#8,rc$
  175. 274 gosub148
  176. 275 close8:close15:goto177
  177. 276 :
  178. 277 :
  179. 278 print""
  180. 279 print"setting up file...wait one moment"
  181. 280 open15,8,15,"ui"
  182. 281 gosub148
  183. 282 open8,8,8,"0:"+(v$)+",l,"+chr$(ln)
  184. 283 gosub148
  185. 284 print""
  186. 285 rn=7
  187. 286 gosub331
  188. 287 print#15,"p"+chr$(96+8)+chr$(rl)+chr$(rh)+chr$(1)
  189. 288 gosub148
  190. 289 if e<>50thenprint"file "v$" exists"
  191. 290 if e=50 thenprint"writing blank file to disk now"
  192. 291 print#8,chr$(255)
  193. 292 gosub148
  194. 293 close8:close15:goto177
  195. 294 :
  196. 295 vw=1:gosub225:vw=0
  197. 296 open15,8,15
  198. 297 gosub148
  199. 298 open8,8,8,"0:"+(v$)+",l,"+chr$(ln)
  200. 299 gosub148
  201. 300 print"ready to edit tape #";v$
  202. 301 gosub104
  203. 302 print"line# (1  chr max) ";:hl=1:gosub129:aa$=y$
  204. 303 ifaa$=""thenprint"cancelled":forpa=1to999:nextpa:goto315
  205. 304 rn=val(aa$)
  206. 305 ifrn>=8thenclose8:close15:goto177
  207. 306 print"time (4  chr max) ";:hl=4:gosub129:bb$=y$
  208. 307 print"title (21 chr max) ";:hl=21:gosub129:cc$=y$
  209. 308 print"start (4  chr max) ";:hl=4:gosub129:dd$=y$
  210. 309 rc$=aa$+ll$+bb$+ll$+cc$+ll$+dd$+ll$+ee$
  211. 310 gosub331
  212. 311 print#15,"p"+chr$(96+